package com.szxy.backend.item.fallback;

import com.szxy.backend.item.feign.CommonItemsFeignClient;
import com.szxy.pojo.*;
import com.szxy.utils.PageResult;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Auther:zwer
 * @Date:2019/9/27 10:06
 * @Description:com.szxy.backend.item.fallback
 * @Version:1.0
 * 对下游服务进行服务降级处理
 **/
@Component
public class CommonItemsFeignClientFallBack implements FallbackFactory<CommonItemsFeignClient> {

    @Override
    public CommonItemsFeignClient create(Throwable throwable) {
        return new CommonItemsFeignClient() {

            @Override
            public PageResult selectTbItemAllByPage(Integer page, Integer rows) {
                return null;
            }

            @Override
            public Integer insertTbItem(TbItem item) {
                return null;
            }

            @Override
            public Integer updateItemById(TbItem item) {
                return null;
            }

            @Override
            public TbItem findItemById(Long itemId) {
                return null;
            }

            @Override
            public List<TbItemCat> selectItemCategoryByParentId(Long id) {
                return null;
            }

            @Override
            public TbItemCat findItemCatByItemId(Long cid) {
                return null;
            }

            @Override
            public TbItemParam selectItemParamByItemCatId(Long itemCatId) {
                return null;
            }

            @Override
            public Integer insertTbItemParam(TbItemParam itemParam) {
                return null;
            }

            @Override
            public PageResult selectItemParamAll(Integer page, Integer rows) {
                return null;
            }

            @Override
            public int deleteItemParamById(Long id) {
                return 0;
            }

            @Override
            public Integer insertItemDesc(TbItemDesc itemDesc) {
                return null;
            }

            @Override
            public TbItemDesc findItemDescByItemId(Long itemId) {
                return null;
            }

            @Override
            public int updateItemDescByItemId(TbItemDesc itemDesc) {
                return 0;
            }

            @Override
            public Integer insertTbItemParamItem(TbItemParamItem itemParamItem) {
                return null;
            }

            @Override
            public TbItemParamItem findItemParamItemByItemId(Long itemId) {
                return null;
            }

            @Override
            public int updateItemParamItemByItemId(TbItemParamItem itemParamItem) {
                return 0;
            }
        };
    }
}
